Field of the Invention
The present invention relates to a technique for determining a threshold value to be used in detection of local features of an image.
Description of the Related Art
The recent advances in robot technology have enabled robots to perform complicated tasks such as assembling processes of industrial products, which used to be manually performed by human workers. Such robots assemble components by gripping them using an end effector such as a hand. The assembly requires measurement of a relative position and orientation between a component to be gripped and the robot (hand). In the position and orientation measurement, a method using model fitting is used in which a three-dimensional geometric model of an object is fitted to features such as edges or key points detected from a two-dimensional image captured by a camera.
In a case of capturing an image of an object by a camera, noise (image sensor noise) such as optical shot noise and reading circuit noise is produced during a process of converting the amount of light entering an image sensor (e.g., complementary metal oxide semiconductor (CMOS) image sensor, charge-coupled device (CCD) image sensor, etc.) of the camera into electric charge. This causes luminance value variation due to the image sensor noise in the acquired image. Use of features detected, originating from such noise, in the model fitting processing impairs the accuracy of the measurement. Thus, it is necessary to set a predetermined threshold value (for example, a difference in luminance between neighboring pixels is equal to or greater than a predetermined level, etc.) in order to prevent detection of features originating from the noise in the feature detection.
In a conventional threshold value setting, manual tuning has commonly been used because an appropriate threshold value varies depending on the brightness of an image to be captured, the reflection luminance of an object, and an image sensor of a camera to be used to capture images. Meanwhile, Japanese Patent No. 4661934 discusses a feature detection method in which luminance variation originating from the image sensor noise is measured in advance and a threshold value is automatically set based on the measured variation. Specifically, Japanese Patent No. 4661934 discusses measuring in advance the amount of variation of luminance of light shielded pixels, automatically setting a threshold value based on the fixed amount of variation of luminance of the light shielded pixels and the image contrast, and then detecting features.
However, the manual tuning has an inevitable problem of inconsistency between human workers performing the manual tuning. Further, the manual tuning is not easy because practical experience is required to appropriately perform the tuning. Furthermore, the method discussed in Japanese Patent No. 4661934 estimates the noise level from the light shielded pixels. This means that only dark current noise among the image sensor noise is taken into consideration. Thus, the method has a problem that the shot noise produced proportionally to the brightness of a pixel cannot be taken into consideration in the process of setting a threshold value for edge detection.